Allow user to set (RTS/CTS) and (DSR/DTR) flows control#76
Open
khssnv wants to merge 1 commit intobabca:masterfrom
Open
Allow user to set (RTS/CTS) and (DSR/DTR) flows control#76khssnv wants to merge 1 commit intobabca:masterfrom
khssnv wants to merge 1 commit intobabca:masterfrom
Conversation
1 similar comment
lcnittl
requested changes
Nov 2, 2021
Collaborator
lcnittl
left a comment
There was a problem hiding this comment.
Thank you for the proposed changes!
pySerial's defaults for both rtscts and dsrdtr are False (cf. pySerial API), thus, please change the defaults in the __init__ funcs to False as well to mimic the behavior before this PR.
After this, should be fine to merge.
| timeout = 1 | ||
|
|
||
| def __init__(self, port, baudrate=115200, notifyCallbackFunc=None, fatalErrorCallbackFunc=None, *args, **kwargs): | ||
| def __init__(self, port, baudrate=115200, rtscts=True, dsrdtr=True, notifyCallbackFunc=None, fatalErrorCallbackFunc=None, *args, **kwargs): |
|
|
||
| def __init__(self, port, baudrate=115200, incomingCallCallbackFunc=None, smsReceivedCallbackFunc=None, smsStatusReportCallback=None, requestDelivery=True, AT_CNMI="", *a, **kw): | ||
| super(GsmModem, self).__init__(port, baudrate, notifyCallbackFunc=self._handleModemNotification, *a, **kw) | ||
| def __init__(self, port, baudrate=115200, rtscts=True, dsrdtr=True, incomingCallCallbackFunc=None, smsReceivedCallbackFunc=None, smsStatusReportCallback=None, requestDelivery=True, AT_CNMI="", *a, **kw): |
| def connect(self): | ||
| """ Connects to the device and starts the read thread """ | ||
| self.serial = serial.Serial(dsrdtr=True, rtscts=True, port=self.port, baudrate=self.baudrate, | ||
| self.serial = serial.Serial(rtscts=self.rtscts, dsrdtr=self.dsrdtr, port=self.port, baudrate=self.baudrate, |
Collaborator
There was a problem hiding this comment.
Please put rtscts and dsrdtr after timeout
|
We need this. |
Collaborator
@alza54 I will see if I manage to integrate it on the weekend. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've tried
python-gsmmodemwith SIMCOM SIM300 based modem (ОВЕН ПМ01), it needs (RTS/CTS) and (DSR/DTR) setFalse.